#ifndef RING_BUF_H
#define RING_BUF_H

typedef struct {
    char** buffer;              //指向指针数组用于管理
    unsigned char size;        //大小 列的大小
    unsigned int length;     //每一行的大小
    unsigned int in;        //往里加入
    unsigned int out;       //读取

}RingBuffer_t;
int init_ring_buffer(RingBuffer_t* rb, unsigned int size,unsigned int length);
int ring_buffer_put(RingBuffer_t* rb, char* put_chars);
int ring_buffer_get(RingBuffer_t* rb,char* get_chars,unsigned int* get_index);
int release_ring_buffer(RingBuffer_t* rb);
#endif